import service from "@/utils/request" 

export interface MainSupportingConditionsPrams{
    gtFlag1:string,
    gtFlag2:string,
    gtFlag3:string,
    lotNo:string,
    ncFlag1:string,
    ncFlag2:string,
    ncFlag3:string,
    pageNum:number,
    pageSize:number,
    style:string
}

export interface MainSupportingConditionsInterface {
    total?: number,
    dto: dto[]
}

export interface dto {
    lotNo: string,
    style: string,
    ordQty: number,
    cutQty: number,
    hfQty: number,
    spQty: number
}

// 主体配套条件分页查询
export const MainSupportingConditions = (parms:MainSupportingConditionsPrams) => {
    return service.put<any,any>('/pcFactorQuery/queryCuttingPartSp',parms)
}

export const CuttingAndMatching = (lotNo:string) => {
    return service.get<any,any>(`/pcFactorQuery/queryCuttingPartSpDetail/${lotNo}`)
}

// 部位已制明细
export const PartsHaveBeenDetailed = (parms:any) => {
    return service.post<any,any>(`/pcFactorQuery/queryCuttingByPart?lotNo=${parms.lotNo}&processCode=${parms.processCode}&sizeNo=${parms.sizeNo}&spFlag=${parms.spFlag}`)
}
